﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using RecruitingApplication.Data_Model;

namespace RecruitingApplication
{
    public partial class CandidateListView : BasePage
    {
        public string InitialQuery { get; set; }

        protected void Page_Load(object sender, EventArgs e)
        {
            if (string.IsNullOrWhiteSpace(Request["q"]))
            {
                InitialQuery = "";
            }
            else
            {
                InitialQuery = Request["q"];
            }

            DataAccessLayer.OpenDB();

            this.CandidatesListView.DataSource = DataAccessLayer.GetAllCandidatesForSearch();
            this.CandidatesListView.DataBind();

            DataAccessLayer.CloseDB();
        }
    }
}